curl --request POST \
--url https://api.evermind.ai/api/v2/memory/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "session-1",
"messages": [
{
"sender_id": "user-1",
"role": "user",
"timestamp": 1700000000,
"content": "I love hiking in the mountains"
}
]
}
'import requests
url = "https://api.evermind.ai/api/v2/memory/add"
payload = {
"session_id": "session-1",
"messages": [
{
"sender_id": "user-1",
"role": "user",
"timestamp": 1700000000,
"content": "I love hiking in the mountains"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
session_id: 'session-1',
messages: [
{
sender_id: 'user-1',
role: 'user',
timestamp: 1700000000,
content: 'I love hiking in the mountains'
}
]
})
};
fetch('https://api.evermind.ai/api/v2/memory/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'session_id' => 'session-1',
'messages' => [
[
'sender_id' => 'user-1',
'role' => 'user',
'timestamp' => 1700000000,
'content' => 'I love hiking in the mountains'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/add"
payload := strings.NewReader("{\n \"session_id\": \"session-1\",\n \"messages\": [\n {\n \"sender_id\": \"user-1\",\n \"role\": \"user\",\n \"timestamp\": 1700000000,\n \"content\": \"I love hiking in the mountains\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/memory/add")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"session-1\",\n \"messages\": [\n {\n \"sender_id\": \"user-1\",\n \"role\": \"user\",\n \"timestamp\": 1700000000,\n \"content\": \"I love hiking in the mountains\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_id\": \"session-1\",\n \"messages\": [\n {\n \"sender_id\": \"user-1\",\n \"role\": \"user\",\n \"timestamp\": 1700000000,\n \"content\": \"I love hiking in the mountains\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"message_count": 123,
"status": "accumulated"
}
}{
"request_id": "<string>",
"data": {
"message_count": 123,
"status": "accumulated"
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Add messages [OSS + Cloud]
Append conversation messages to a session’s working memory. One call carries 1–500 messages.
The write is asynchronous by default (async_mode true): the gateway validates and enqueues it, answering 202 with status “queued”. Pass async_mode: false to forward synchronously and receive the engine’s 200 result instead.
Distillation into long-term memory is always asynchronous — it runs on a session boundary, or when you call /api/v2/memory/flush.
curl --request POST \
--url https://api.evermind.ai/api/v2/memory/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "session-1",
"messages": [
{
"sender_id": "user-1",
"role": "user",
"timestamp": 1700000000,
"content": "I love hiking in the mountains"
}
]
}
'import requests
url = "https://api.evermind.ai/api/v2/memory/add"
payload = {
"session_id": "session-1",
"messages": [
{
"sender_id": "user-1",
"role": "user",
"timestamp": 1700000000,
"content": "I love hiking in the mountains"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
session_id: 'session-1',
messages: [
{
sender_id: 'user-1',
role: 'user',
timestamp: 1700000000,
content: 'I love hiking in the mountains'
}
]
})
};
fetch('https://api.evermind.ai/api/v2/memory/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'session_id' => 'session-1',
'messages' => [
[
'sender_id' => 'user-1',
'role' => 'user',
'timestamp' => 1700000000,
'content' => 'I love hiking in the mountains'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/add"
payload := strings.NewReader("{\n \"session_id\": \"session-1\",\n \"messages\": [\n {\n \"sender_id\": \"user-1\",\n \"role\": \"user\",\n \"timestamp\": 1700000000,\n \"content\": \"I love hiking in the mountains\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/memory/add")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"session-1\",\n \"messages\": [\n {\n \"sender_id\": \"user-1\",\n \"role\": \"user\",\n \"timestamp\": 1700000000,\n \"content\": \"I love hiking in the mountains\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_id\": \"session-1\",\n \"messages\": [\n {\n \"sender_id\": \"user-1\",\n \"role\": \"user\",\n \"timestamp\": 1700000000,\n \"content\": \"I love hiking in the mountains\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"message_count": 123,
"status": "accumulated"
}
}{
"request_id": "<string>",
"data": {
"message_count": 123,
"status": "accumulated"
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Authorizations
API key issued by EverOS, sent as Authorization: Bearer <api_key>.
Body
The conversation these messages belong to (1–128 characters). It is the unit extraction works on: /api/v2/memory/flush takes this id, and a session boundary is what triggers extraction on its own.
1 - 128The turns to append, in order — 1 to 500 per call. Each carries its own sender and timestamp, so one call can hold a whole exchange.
1 - 500 elementsShow child attributes
Show child attributes
Business-semantic scope for this write, defaulting to "default". Reads must use the same app_id / project_id pair to see what was written under it. Note this is a partition, not the security boundary — that is the tenant resolved from your API key.
Second half of the business-semantic scope, defaulting to "default". See app_id.
Selects the write path. true (default): validated and enqueued asynchronously → HTTP 202 with status "queued". false: forwarded synchronously to the engine, returning its 200 result and surfacing write errors directly. Extraction is always asynchronous (flush-triggered).
Was this page helpful?

